3.26.46 \(\int x^{-1-3 n} (a+b x^n)^3 \, dx\) [2546]

Optimal. Leaf size=52 \[ -\frac {a^3 x^{-3 n}}{3 n}-\frac {3 a^2 b x^{-2 n}}{2 n}-\frac {3 a b^2 x^{-n}}{n}+b^3 \log (x) \]

[Out]

-1/3*a^3/n/(x^(3*n))-3/2*a^2*b/n/(x^(2*n))-3*a*b^2/n/(x^n)+b^3*ln(x)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {272, 45} \begin {gather*} -\frac {a^3 x^{-3 n}}{3 n}-\frac {3 a^2 b x^{-2 n}}{2 n}-\frac {3 a b^2 x^{-n}}{n}+b^3 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 - 3*n)*(a + b*x^n)^3,x]

[Out]

-1/3*a^3/(n*x^(3*n)) - (3*a^2*b)/(2*n*x^(2*n)) - (3*a*b^2)/(n*x^n) + b^3*Log[x]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int x^{-1-3 n} \left (a+b x^n\right )^3 \, dx &=\frac {\text {Subst}\left (\int \frac {(a+b x)^3}{x^4} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^3}{x^4}+\frac {3 a^2 b}{x^3}+\frac {3 a b^2}{x^2}+\frac {b^3}{x}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {a^3 x^{-3 n}}{3 n}-\frac {3 a^2 b x^{-2 n}}{2 n}-\frac {3 a b^2 x^{-n}}{n}+b^3 \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 48, normalized size = 0.92 \begin {gather*} -\frac {a x^{-3 n} \left (2 a^2+9 a b x^n+18 b^2 x^{2 n}\right )}{6 n}+\frac {b^3 \log \left (x^n\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 - 3*n)*(a + b*x^n)^3,x]

[Out]

-1/6*(a*(2*a^2 + 9*a*b*x^n + 18*b^2*x^(2*n)))/(n*x^(3*n)) + (b^3*Log[x^n])/n

________________________________________________________________________________________

Maple [A]
time = 0.24, size = 49, normalized size = 0.94

method result size
risch \(b^{3} \ln \left (x \right )-\frac {3 a \,b^{2} x^{-n}}{n}-\frac {3 a^{2} b \,x^{-2 n}}{2 n}-\frac {a^{3} x^{-3 n}}{3 n}\) \(49\)
norman \(\left (b^{3} \ln \left (x \right ) {\mathrm e}^{3 n \ln \left (x \right )}-\frac {a^{3}}{3 n}-\frac {3 a \,b^{2} {\mathrm e}^{2 n \ln \left (x \right )}}{n}-\frac {3 a^{2} b \,{\mathrm e}^{n \ln \left (x \right )}}{2 n}\right ) {\mathrm e}^{-3 n \ln \left (x \right )}\) \(61\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1-3*n)*(a+b*x^n)^3,x,method=_RETURNVERBOSE)

[Out]

b^3*ln(x)-3*a*b^2/n/(x^n)-3/2*a^2*b/n/(x^n)^2-1/3*a^3/n/(x^n)^3

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 52, normalized size = 1.00 \begin {gather*} b^{3} \log \left (x\right ) - \frac {a^{3}}{3 \, n x^{3 \, n}} - \frac {3 \, a^{2} b}{2 \, n x^{2 \, n}} - \frac {3 \, a b^{2}}{n x^{n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-3*n)*(a+b*x^n)^3,x, algorithm="maxima")

[Out]

b^3*log(x) - 1/3*a^3/(n*x^(3*n)) - 3/2*a^2*b/(n*x^(2*n)) - 3*a*b^2/(n*x^n)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 51, normalized size = 0.98 \begin {gather*} \frac {6 \, b^{3} n x^{3 \, n} \log \left (x\right ) - 18 \, a b^{2} x^{2 \, n} - 9 \, a^{2} b x^{n} - 2 \, a^{3}}{6 \, n x^{3 \, n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-3*n)*(a+b*x^n)^3,x, algorithm="fricas")

[Out]

1/6*(6*b^3*n*x^(3*n)*log(x) - 18*a*b^2*x^(2*n) - 9*a^2*b*x^n - 2*a^3)/(n*x^(3*n))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 318 vs. \(2 (44) = 88\).
time = 14.87, size = 318, normalized size = 6.12 \begin {gather*} \begin {cases} a^{3} x + \frac {9 a^{2} b x^{\frac {2}{3}}}{2} + 9 a b^{2} \sqrt [3]{x} + b^{3} \log {\left (x \right )} & \text {for}\: n = - \frac {1}{3} \\\left (a + b\right )^{3} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {6 a^{3} n}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {2 a^{3}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {27 a^{2} b n x^{n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {9 a^{2} b x^{n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {54 a b^{2} n x^{2 n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {18 a b^{2} x^{2 n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} + \frac {18 b^{3} n x^{3 n} \log {\left (x^{n} \right )}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} + \frac {6 b^{3} n x^{3 n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} + \frac {6 b^{3} x^{3 n} \log {\left (x^{n} \right )}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1-3*n)*(a+b*x**n)**3,x)

[Out]

Piecewise((a**3*x + 9*a**2*b*x**(2/3)/2 + 9*a*b**2*x**(1/3) + b**3*log(x), Eq(n, -1/3)), ((a + b)**3*log(x), E
q(n, 0)), (-6*a**3*n/(18*n**2*x**(3*n) + 6*n*x**(3*n)) - 2*a**3/(18*n**2*x**(3*n) + 6*n*x**(3*n)) - 27*a**2*b*
n*x**n/(18*n**2*x**(3*n) + 6*n*x**(3*n)) - 9*a**2*b*x**n/(18*n**2*x**(3*n) + 6*n*x**(3*n)) - 54*a*b**2*n*x**(2
*n)/(18*n**2*x**(3*n) + 6*n*x**(3*n)) - 18*a*b**2*x**(2*n)/(18*n**2*x**(3*n) + 6*n*x**(3*n)) + 18*b**3*n*x**(3
*n)*log(x**n)/(18*n**2*x**(3*n) + 6*n*x**(3*n)) + 6*b**3*n*x**(3*n)/(18*n**2*x**(3*n) + 6*n*x**(3*n)) + 6*b**3
*x**(3*n)*log(x**n)/(18*n**2*x**(3*n) + 6*n*x**(3*n)), True))

________________________________________________________________________________________

Giac [A]
time = 1.59, size = 51, normalized size = 0.98 \begin {gather*} \frac {6 \, b^{3} n x^{3 \, n} \log \left (x\right ) - 18 \, a b^{2} x^{2 \, n} - 9 \, a^{2} b x^{n} - 2 \, a^{3}}{6 \, n x^{3 \, n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-3*n)*(a+b*x^n)^3,x, algorithm="giac")

[Out]

1/6*(6*b^3*n*x^(3*n)*log(x) - 18*a*b^2*x^(2*n) - 9*a^2*b*x^n - 2*a^3)/(n*x^(3*n))

________________________________________________________________________________________

Mupad [B]
time = 1.34, size = 52, normalized size = 1.00 \begin {gather*} b^3\,\ln \left (x\right )-\frac {a^3}{3\,n\,x^{3\,n}}-\frac {3\,a\,b^2}{n\,x^n}-\frac {3\,a^2\,b}{2\,n\,x^{2\,n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)^3/x^(3*n + 1),x)

[Out]

b^3*log(x) - a^3/(3*n*x^(3*n)) - (3*a*b^2)/(n*x^n) - (3*a^2*b)/(2*n*x^(2*n))

________________________________________________________________________________________